import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.util.Timer;

/**
 * Created with IntelliJ IDEA.
 * User: valeriykuchma
 * Date: 13.03.13
 * Time: 01:24
 * To change this template use File | Settings | File Templates.
 */
public class MouseClickControl extends MouseAdapter {
//    private boolean singleClick  = false;
//    private boolean doubleClick = false;
//    private int doubleClickDelay = 300;
//    private static Timer timer;

    @Override
    public void mouseClicked(MouseEvent mouseEvent) {
//        super.mouseClicked(mouseEvent);    //To change body of overridden methods use File | Settings | File Templates.
        if (mouseEvent.getClickCount() == 1)
            singleClickHandler();
        else
            doubleClickHandler();

    }

    public void singleClickHandler(){
        System.out.println("Mouse Single Click");

    }

    public void doubleClickHandler(){
        System.out.println("Mouse Double Click");
    }
}
